/*
 * @Author: 结算界面，重新开始
 * @Date: 2020-05-21 10:31:40
 * @LastEditTime: 2020-05-22 10:18:31
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \jump\assets\script\game\OverPanel.ts
 */ 

const {ccclass, property} = cc._decorator;

@ccclass
export class OverPanel extends cc.Component {

    @property(cc.Label)
    private messageLabel: cc.Label = null;
    @property(cc.Node)
    private restartButton: cc.Node = null;

    public show(score: number, cb: Function, cbtarget?: any) {
        this.node.active = true;
        this.messageLabel.string = score + '';
        this.restartButton.once(cc.Node.EventType.TOUCH_END, cb, cbtarget);
    }

    public hide() {
        this.node.active = false;
    }
}

